/**
 * 所有版权归 广西梧州 陈锦韬 所有
 *
 * @Title: PlfUserInfoForm
 * @Package com.rx.com.rx.stock.vo
 * @Description: 用户信息表单
 * @author: 陈锦韬
 * @date: 2020\9\8 0008
 * @version V1.0
 * @Copyright: 2020 陈锦韬  All rights reserved.
 */
package com.rx.uua.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.rx.core.base.RxBaseConstant;
import com.rx.core.data.RxData;
import com.rx.core.dbase.RxBizDbMust;
import com.rx.core.dbase.RxMarkDbMust;
import com.rx.core.dbase.SensitiveInfo;
import com.rx.core.enm.SENSITIVE_TYPE;
import com.rx.core.util.RxUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author: Administrator
 * @Description: 用户信息表单
 * @date: 2020\9\8 0008
 */
@RxData
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class UuaUserInfo extends RxMarkDbMust {
    private static final long serialVersionUID = 1L;
    public static final String BIRTH_DATE = "BIRTH_DATE";
    public static final String ID_NO = "ID_NO";
    public static final String PASSWORD = "PASSWORD";
    public static final String SEX = "SEX";
    public static final String ORG_FLG = "ORG_FLG";
    public static final String PHONE = "PHONE";
    public static final String EMAIL = "EMAIL";
    public static final String SALT = "SALT";

    public static List<String> removeField(){
        return Arrays.asList(BIRTH_DATE,ID_NO,PASSWORD,SEX,ORG_FLG,PHONE,SALT);
    }
    public  UuaUserInfo fieldSetNull(){
        setAge(null);
        setEmail(null);
        setPassword(null);
        setSalt(null);
        setSex(null);
        setOrgFlg(null);
        setPhone(null);
        setIdNo(null);
        setBirthDate(null);
        return this;
    }
    public UuaUserInfo jsonClone(){
        UuaUserInfo uuaUserInfo = new UuaUserInfo();
        RxUtil.copyProperties(this,uuaUserInfo);
        return uuaUserInfo;
    }


    /**
     * 用户类型
     */
    @TableField("USER_TYPE")
    private String userType;
    /**
     * 用户名
     */
    @TableField("USER_NAME")
    private String userName;

    /**
     * 用户ID
     */
    @TableField("USER_ID")
    private String userId;

    /**
     * 真是姓名
     */
    @TableField("REAL_NAME")
    private String realName;

    /**
     * 用户名
     */
    @TableField("NICK_NAME")
    private String nickName;

    /**
     * 生日
     */
    @TableField("BIRTH_DATE")
    @JSONField(format = RxBaseConstant.DATE_FORMAT_DATEONLY)
    private Date birthDate;

    /**
     * 身份证号码
     */
    @TableField("ID_NO")
    private String idNo;
    /**
     * 密码
     */
    @TableField("PASSWORD")
    private String password;

    /**
     * 随机+密码
     */
    @TableField("SALT")
    private String salt;

    /**
     * 登录次数
     */
    @TableField("LOGIN_COUNT")
    private Long loginCount;

    /**
     * 性别
     */
    @TableField("SEX")
    private String sex;

    /**
     * 年龄
     */
    @TableField("AGE")
    private Long age;
    /**
     * 邮件
     */
    @TableField("EMAIL")
    private String email;
    /**
     * 手机
     */
    @TableField("PHONE")
    @SensitiveInfo(SENSITIVE_TYPE.MOBILE_PHONE)
    private String phone;
    /**
     * 头像
     */
    @TableField("IMAGE")
    private String image;
    /**
     * 状态0-正常 1-禁用（不能登录） 2-冻结（只能查询） 3-受限
     */
    @TableField("STATUS")
    private String status;
    /**
     * 状态0-无组织 1-有组织
     */
    @TableField("ORG_FLG")
    private String orgFlg;

    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;

}
